package com.glsc.ngateway.common.base.domainmapper;

import com.glsc.ngateway.common.base.domain.mysql.gateway.platform.it.project.ProjectSystemRelation;
import com.glsc.ngateway.common.api.platform.dto.it.project.ProjectSystemRelationDto;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;


/**
 * @Author: xc
 * @Desc: domin到dto转换辅助类
 */
@Mapper(componentModel = "spring")
public interface ProjectSystemRelationMapper {
    ProjectSystemRelationMapper INSTANCE = Mappers.getMapper(ProjectSystemRelationMapper.class);

    ProjectSystemRelationDto domain2dto(ProjectSystemRelation domain);

    List<ProjectSystemRelationDto> domain2dto(List<ProjectSystemRelation> domain);

    @Mapping(target = "insertTime", ignore = true)
    @Mapping(target = "updateTime", ignore = true)
    @Mapping(target = "deleted", ignore = true)
    ProjectSystemRelation dto2domain(ProjectSystemRelationDto dto);

    List<ProjectSystemRelation> dto2domain(List<ProjectSystemRelationDto> dto);
}
